<?php

/**
 * Adjunto form.
 *
 * @package    damicoweb
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class AdjuntoForm extends BaseAdjuntoForm
{
  public function configure()
  {
		parent::setUp();

		unset(
			$this['cursos_list']
		);
  	
		$this->setWidget('archivo_url', new sfWidgetFormInputFileEditable(
			array(
				'edit_mode' => false,
				'with_delete' => false,
				'file_src' => '',
			)
		));

		$this->setValidator('archivo_url', new sfValidatorFile(
			array(
				'max_size' => 2097152,
				'mime_types' => array(	'application/zip',
										'application/x-zip',
										'application/octet-stream',
										'application/pdf',
										'application/vnd.ms-office'
								),
				'path' => sfConfig::get('sf_upload_dir').'/adjuntos',
				'required' => false,
				'validated_file_class' => 'ValidarImagenSubida')
		));
  }
}
